Field of the Invention
The present invention relates to a method for real-time testing of a control unit for an internal combustion engine using a simulator, and also relates to a simulator, wherein the simulator comprises a first simulator processor and a first simulator I/O interface, wherein the control unit comprises a control unit processor and a control unit I/O interface, and wherein the control unit and the simulator are connected to one another through their I/O interfaces by means of a first data channel, and the control unit transmits engine control data to the simulator through the first data channel, and the simulator calculates engine state variables in real time on its first simulator processor with a first sampling step size using the engine control data and using a full engine model and transmits at least some of the engine state variables to the control unit.
Description of the Background Art
A generic method for performing a real-time test of a control unit is also known in practice as a hardware-in-the-loop test. Simulators of the generic type for carrying out such a method are known under the names hardware-in-the-loop simulator or HIL simulator. “Hardware-in-the-loop test” is understood to mean that the hardware to be tested—here in the form of a control unit—is not tested in its real environment—in the present case, in conjunction with the internal combustion engine that is to be operated—but instead in an environment that is at least partially simulated in the simulator. To this end, the simulator is connected to the control unit through the corresponding I/O interfaces in each case, so that the simulator receives the electrical signals output by the control unit, causes them to be included in the calculation of the full engine model, and in turn calculates data in real time that are sent to the control unit in the form of signals through the data channel between the simulator and the control unit, for example. Here, the term data channel describes a suitable connection for transmitting data or signals, for example a bus connection, which can also comprise additional subchannels. In this context, “real time” means that the engine state variables are calculated so quickly that for all practical purposes the control unit cannot detect whether it is being operated with a real engine or only in a simulated environment. In order for this to function, the first simulator I/O interface additionally must be matched in terms of hardware and signals such that it seems like the I/O interface of the real engine to the control unit.
The advantages of such a testing method are obvious: it is possible to verify the behavior of the control unit in a completely risk-free manner, with a good capability for observing the control unit and with the capability of exploring even extreme operating situations, and thereby ascertaining whether the control unit drives and monitors the engine as expected. Since engine state variables are transmitted from the simulator to the control unit and engine control data are transmitted from the control unit to the simulator via the data channel on a continuous basis, the control unit is tested “in the control loop” (hence “in the loop.”)
It is immediately obvious that the quality of such a real-time test of a control unit depends critically on the quality of the underlying mathematical model, hence the full engine model, and from the most precise possible calculation of this full engine model. Thermodynamic models of internal combustion engines typically have comprehensive systems of differential equations that must be solved numerically in real time in order to obtain the engine state variables of interest. When mention is made herein that the simulator has a full engine model, this is only intended to mean that it is possible with the full engine model to calculate all of the engine state variables that are required in order to appropriately stimulate the control unit under test that is connected to the simulator, which is to say to supply it with all necessary engine state variables via the data channel. In particular, if the control unit requires cylinder internal pressure as an input quantity, it is necessary to employ a full engine model that models the thermodynamic processes in the cylinder. The complexity of typical full engine models places great demands on the simulator processor, which must calculate the engine state variables of interest in each sampling step.
A problem can arise, for example, when the control unit makes it necessary to provide engine state variables at a frequency that does not correspond to the sampling step size of the simulator processor, and in particular is greater than the frequency defined by the first sampling step size of the simulator processor. Another problem can arise because engine state variables are to be transmitted at different, and in particular variable, time intervals than is possible with the first, fixed sampling step size of the simulator. A specific example of such an engine state variable is the cylinder pressure in the combustion chamber of a cylinder, wherein the pressure in the cylinder is provided to the control unit for each cylinder of the internal combustion engine. One example of such an HIL system is described in the German press release titled “HiL-Simulation in der Praxis: Hochdynamische Regelung des Zylinderdruckverlaufs.”
Modern control units require reporting of cylinder pressures not at fixed time intervals, but at, e.g., fixed intervals of crank angle, which is to say the angle of rotation of the crankshaft, for example one value for each degree of crank angle, and in particular over the full speed range of the engine. At a speed of 6000 RPM, this means that the calculation of the full engine model can last barely 30 μs in order to be able to provide a calculated value for the cylinder pressure or cylinder pressures to the control unit at every degree of change in the crank angle. Depending on the complexity of the full engine model this cannot be implemented, with the result that real-time conditions cannot be maintained.